package dao

import (
	"gitee.com/Luna-CY/Golang-Project-Template/internal/context"
	"gitee.com/Luna-CY/Golang-Project-Template/internal/errors"
    "gitee.com/Luna-CY/Golang-Project-Template/model"
)

// SystemSmtpLog Data access object for SystemSmtpLog definition
type SystemSmtpLog interface {
	Transactional
	
	// FindSystemSmtpLogByCondition find SystemSmtpLog by simple condition from db
	FindSystemSmtpLogByCondition(ctx context.Context, page int, size int, options ...SystemSmtpLogOption) (int64, []*model.SystemSmtpLog, errors.Error)
	
	// SaveSystemSmtpLog save SystemSmtpLog to db
	// if SystemSmtpLog id is 0, it will create a new record, otherwise, it will update the record
	SaveSystemSmtpLog(ctx context.Context, systemSmtpLog *model.SystemSmtpLog) errors.Error

	// TakeSystemSmtpLogByCondition get SystemSmtpLog by condition from db
	// if SystemSmtpLog not found, return error type with errors.ErrorTypeRecordNotFound
	TakeSystemSmtpLogByCondition(ctx context.Context, options ...SystemSmtpLogOption) (*model.SystemSmtpLog, errors.Error)

	// DeleteSystemSmtpLogByCondition delete SystemSmtpLog by condition from db
	DeleteSystemSmtpLogByCondition(ctx context.Context, options ...SystemSmtpLogOption) errors.Error

	// BatchTakeSystemSmtpLogByCondition get SystemSmtpLog by condition from db
	BatchTakeSystemSmtpLogByCondition(ctx context.Context, options ...SystemSmtpLogOption) ([]*model.SystemSmtpLog, errors.Error)
}

